/*
 * ConceptualProductBO.java
 *
 * Created on March 30, 2007, 12:30 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

//package edu.byu.isys413.pb88.data;
package finalintex2web;
/**
 *
 * @author Owner
 */
public class ConceptualProductBO extends ProductBO
{
    
    /** Creates a new instance of ConceptualProductBO */
    private String productName;
    private String description;
    private double averageCost;
    private boolean dirty;
    private boolean indb;
    private String id;
    public ConceptualProductBO(String id) 
    {
        super(id);
    }
    //gets the product name
    //@return productname
    public String getProductName() {
        return productName;
    }
    /*@param: product name
     *Sets the produt name for the conceptual product
     */
    public void setProductName(String productName) {
        this.productName = productName;
        dirty = true;
    }
    
    /*@return: Description
     *Gets the description for the conceptual product
     */
    public String getDescription() {
        return description;
    }
    /*@param: Description
     *sets the description for the conceptual product
     */
    
    public void setDescription(String description) {
        this.description = description;
        dirty = true;
    }
    
    /*@return: averageCost
     *gets the average cost for the conceptual product
     */
    
    public double getAverageCost() {
        return averageCost;
    }
    
    /*@param: averageCost
     *sets the average cost for the conceptual product
     */
    public void setAverageCost(double averageCost) {
        this.averageCost = averageCost;
        dirty = true;
    }
/**
     * This method enables us to know if the object is dirty. If the object is dirty then we need to update it in the database.
     *If the object is not dirty then we dont need to update the object in the database.
     * @return 
     */
    public boolean isDirty() {
        return dirty;
    }
 /**
     * 
     * @param dirty 
     * Sets the object as dirty or not dirty depending on the parameter passed.
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }
    /**
     * @return boolean indb 
     * This method is to check if this object is already set in the database or not.
     *
     */
    public boolean isIndb() {
        return indb;
    }
    /**
     * @param indb
     * Sets the indb variable to whatever is passed in indb.
     *This method is to tell the object that this object has already been saved or not saved in the database. 
     */
    public void setIndb(boolean indb) {
        this.indb = indb;
    }
    /*Gets the id for the object
     */
    public String getId() {
        return id;
    }
    /*sets the id for the object
     */
    public void setId(String id) {
        this.id = id;
        dirty = true;
    }
    
}
